//
//  WHDefaultNotificationCenter.h
//  WHAnimations
//
//  Created by she1323 on 2017/3/21.
//  Copyright © 2017年 she1323. All rights reserved.
//

#import <Foundation/Foundation.h>

@class WHDefaultNotificationCenter;

@protocol WHDefaultNotificationCenterDelegate <NSObject>

@required

/**
 *  通知触发事件
 */
- (void)defaultNotificationCenter:(WHDefaultNotificationCenter *)notification name:(NSString *)name object:(id)object;

@end


@interface WHDefaultNotificationCenter : NSObject

/**
 *  发送一个通知
 */
+ (void)wh_postEventToNotificationName:(NSString *)name object:(id)object;

/**
 *  通知的代理
 */
@property (nonatomic, weak) id <WHDefaultNotificationCenterDelegate>  delegate;

/**
 *  添加一个监听通知
 */
- (void)wh_addNotificationName:(NSString *)name;

/**
 *  删除一个监听知
 */
- (void)wh_deleteNotificationName:(NSString *)name;

/**
 *  得到所有监听通知,通知名
 */
- (NSArray <NSString *> *)wh_notificationNames;

/**
 *  删除所有的监听通知
 */
- (void)wh_removeAllNotifications;


@end
